#include "smUniform.h"
#include <iostream>
using namespace std;

namespace ShaderManager
{

smUniform::smUniform(GLuint program_id, const char* uniform_name)
: name(uniform_name), loaded(false)
{
	update(program_id);
}

void smUniform::update(GLuint program_id)
{
	id = glGetUniformLocation(program_id,name.data());

	if( (int)id < 0)
	{
		std::cout << "Warning : shader uniform \"" << name << "\" not found !" << std::endl;
	}
}
}